
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link th:href="@{/css/web.css}" rel="stylesheet">
    <script type="text/javascript" th:src="@{https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js}"></script>
</head>
<body>
<div class="product" th:each="product:${products}">
    <!--商品图片配置虚拟路径-->
    <img th:src="@{'/'+${product.pimg}}"/><!---->
    <p><span class="name" th:text="${product.pname }"></span><span class="price" th:text="${product.price }"></span></p>
    <p class="info" th:text="${product.info }"></p>
    <a href="javascript:void(0)" class="btn">加入购物车</a>
</div>

</body>
</html>